<template>
  <div class="container-wrap">
    <bodyWrap :isShow="bodyShow">
      <div slot="body" v-if="bodyShow">

        <!--选题列表-->
        <div class="d-item-wrap">
          <div class="d-title">
            信息列表
            <div class="btn-edit"
                 @click="editInfo"
                 v-if="details.isTodo == 1 && titleFlag === 40">
              {{editBtnTxt}}
            </div>
          </div>
          <div class="d-content">
            <ul id="sort">
              <li class="item"
                  v-for="(item,index) in details.infoProcessDetails"
                  :data-value="item.id"
                  :class="[
                  {'edit-item':editBtn},
                  {'draggable':item.isImportant != 1},
                  {'draggable2':item.isImportant == 1},
                  ]">
                <div class="drag-wrap"
                     v-if="editBtn">
                  <i class="iconfont icon-icontuozhuaishangxia"
                     :class="[
                  {'btn1':item.isImportant != 1},
                  {'btn2':item.isImportant == 1},
                  ]"></i>
                </div>
                <div class="title" :class="{'title2':editBtn}">
                  <!--<i class="iconfont icon-xing" v-if="item.isImportant == 1"></i>-->
                  <span class="important" v-if="item.isImportant == 1">重要</span>
                  {{item.messageTitle}}
                </div>
                <div class="news-s">
                  <div class="content">
                    报送单位：{{item.sendDeptName}}
                  </div>
                </div>
                <div class="news-s">
                  <div class="content">
                    报送人：{{item.sendUserName}}
                  </div>
                  <div class="btn-d" @tap="goDetails(item)">
                    查看详情
                  </div>
                </div>
                <div class="close-wrap"
                     v-if="editBtn || titleFlag == 50"
                     @tap.prevent="infoCheck(item,index)">
                  <!--<i class="iconfont icon-close"></i>-->
                  <div class="btn-plus">
                    操作
                  </div>
                </div>
              </li>
            </ul>
          </div>
        </div>

        <transition-group name="fadeShow">
          <!--领导意见返现-->
          <div :key="1001" v-if="leaderAdShow">
            <leaderAdviseList :title="'处理意见'"></leaderAdviseList>
          </div>
        </transition-group>

        <template v-if="details.isTodo == 1">

          <!--意见输入框-->
          <textarea_y :label="details.zbySubmitLabel"
                      :id="'advise'">
          </textarea_y>

          <!--按钮区域-->
          <div class="btn-wrap">
            <div class="btn-b"
                 v-if="details.nextNodeType"
                 @click="goLeader">请示领导
            </div>
            <template v-if="details.submitFlag === 10">
              <div class="btn-b" @click="submitTn(0)">关闭</div>
            </template>
            <template v-if="details.submitFlag === 20">
              <div class="btn-b" @click="submitTn(0)">同意</div>
              <div class="btn-b" @click="submitTn(2)">退回</div>
            </template>
          </div>
        </template>

      </div>
    </bodyWrap>
    <transition name="slideRight">
      <router-view></router-view>
    </transition>

    <actionSheetWrap
      :isShow="actionShow"
      :actionData="actionData"
      @check="actionCheck"
      @cancel="actionShow = false">
    </actionSheetWrap>
  </div>
</template>

<script>
  import newsDetail from "./todayNewsDetail.js"

  export default newsDetail
</script>

<style scoped>
  .sort-wrap {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 80%;
    opacity: 0;
    z-index: 11;
  }

  .sort-wrap2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 20%;
    opacity: 0;
    z-index: 11;
  }

  .title2 {
    padding-right: 34px;
  }
  .btn1{
    color: #2196f3
  }
  .btn2{
    color: #ee7c8a
  }
</style>
